import { createRouter, createWebHistory } from 'vue-router'
import MedicalClinicForm from "../view/MedicalClinicForm.vue";
import query from "../view/query.vue";
import SubmitFeedback from "../view/SubmitFeedback.vue";
import home from "../view/home.vue";
import PrescriptionInquiry from "../view/PrescriptionInquiry.vue";
import MapSelector from '../components/MapSelector.vue';
import HerbList from "../view/HerbList.vue";
import HerbDetail from "../view/HerbDetail.vue";
import DiseaseStatistics from "../view/DiseaseStatistics.vue";
import Map from "../view/Map.vue";

const routes = [
    {
        path: '/',
        name: 'home',
        component: home,
        meta: { requiresAuth: true },
    },
    {
        path: '/MedicalClinicForm',
        name: 'MedicalClinicForm',
        component: MedicalClinicForm,
        meta: { requiresAuth: true },
    },
    {
        path: '/query',
        name: 'query',
        component: query,
        meta: { requiresAuth: true },
    },
    {
        path: '/SubmitFeedback',
        name: 'SubmitFeedback',
        component: SubmitFeedback,
        meta: { requiresAuth: true },
    },
    {
        path: '/PrescriptionInquiry',
        name: 'PrescriptionInquiry',
        component: PrescriptionInquiry,
        meta: { requiresAuth: true },
    },
    {
        path: '/map-selector',
        name: 'MapSelector',
        component: MapSelector
    },
    {
        path: '/HerbList',
        name: 'HerbList',
        component: HerbList,
        props: true,
        meta: { requiresAuth: true },
    },
    {
        path: '/HerbDetail:id/:name',
        name: 'HerbDetail',
        component: HerbDetail,
        props: true,
        meta: { requiresAuth: true },
    },
    {
        path: '/DiseaseStatistics',
        name:'DiseaseStatistics',
        component: DiseaseStatistics,
        props: true,
        meta: { requiresAuth: true },
    },
    {
        path: '/Map',
        name:'Map',
        component: Map,
        props: true,
        meta: { requiresAuth: true },
    },


]

const router = createRouter({
    history: createWebHistory(),
    routes // short for `routes: routes`
})

export default router